//
//  ViewController.m
//  命令模式
//
//  Created by flannery on 2018/12/19.
//  Copyright © 2018年 flannery. All rights reserved.
//

#import "ViewController.h"
#import "Stock.h"
#import "Order.h"
#import "Broker.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    Stock *abcStock = Stock.new;
    
    BuyStock *buyStockOrder = [[BuyStock alloc]initWithStock:abcStock];
    SellStock *sellStockOrder = [[SellStock alloc] initWithStock:abcStock];
    
    Broker *broker = Broker.new;
    [broker takeOrder:buyStockOrder];
    [broker takeOrder:sellStockOrder];
    
    [broker placeOrders];
    
}


@end
